﻿using System;

namespace enyo
{
    /// <summary>
    /// An enyo.Service manages interaction with a process whose response is available asynchronously.
    /// In addition to the functionality of enyo.BasicService, enyo.Service adds support for making multiple request calls.
    /// Use the call method to initiate a service call. The call method takes two arguments.
    /// The first, inParams, is the parameters the request should use to make the service request; 
    /// the second, inProps, can optionally customize the request itself. It's most common to pass event handler delegate names via call.
    /// </summary>
    public class Service : BasicService
    {
        public ServiceKind Kind;

        /// <summary>
        /// Calls a service.
        /// </summary>
        /// <param name="params">Parameters to send to the service.</param>
        /// <param name="props">Properties to set on the service call request, can include: onSuccess, onFailure, onResponse, name. You can pass additional properties here that will be visible in the event handlers via the inRequest argument.</param>
        public void Call(object @params, object/*TODO:Type*/ props)
        {
        }

        /// <summary>
        /// Calls a service.
        /// </summary>
        /// <param name="params">Parameters to send to the service.</param>        
        public void Call(object @params)
        {
        }

        /// <summary>
        /// Cancels a specific service call request.
        /// </summary>
        /// <param name="name">Name of the service call to cancel.</param>
        public void CancelCall(string name)
        {
        }
    }
}
